package com.tjbklx1.thread.chap08.demo01;

public class WorkerThread extends Thread {
	private final Channel channel;

	public WorkerThread(String name, Channel channel) {
		super(name);
		System.out.println(name);
		this.channel = channel;
	}
	
	@Override
	public void run() {
		while(true){
			System.out.println("worker take request");
			Request request = channel.takeRequest();
			request.execute();
		}
	}
	
}
